﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CBE.Services;
using CBE.Model;
using Common.UI.EM;
using CBE.UI.Control.Views;

namespace CBE.UI.Control
{
    public class AdministrarTurnosController : GenericEntityController<AdministrarTurnosServiceLogic, Turnos, AdministrarTurnosCriteria, AdministrarTurnosView>
    {
        public override string Title
        {
            get
            {
                return "Administrar turnos";
            }
        }

        protected override void CreateEntityPresentationModel()
        {
            this.EntityPresentationModel = new AdministarTurnosEntityPresentationModel(this.CreateFilterView(), this.CreateListView(), this.CreateDetailView());
        }

        protected override Common.UI.EM.Views.DetailDataView CreateDetailDataView()
        {
            return new AdministrarTurnosDetailDataView();
        }

        protected override Common.UI.EM.Views.FilterDataView CreateFilterDataView()
        {
            return new AdministrarTurnosFilterDataView();
        }

        protected override void AddColumnDefinitions()
        {
            this.EntityPresentationModel.AddColumnDefinition(AdministrarTurnosView.NumeroPropertyName, "Número de turno");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarTurnosView.NombreApellidoPropertyName, "Nombre y Apellido");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarTurnosView.FechaStringPropertyName, "Fecha");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarTurnosView.HoraPropertyName, "Hora");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarTurnosView.TipoServicioPropertyName, "Servicio");
        }
    }
}
